package com.mac.hosp_pre.order.enums;

import lombok.Getter;

import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;

@Getter
public enum WxPayStateEnum {
    SUCCESS("支付成功"),
    REFUND("转入退款"),
    NOTPAY("未支付"),
    CLOSED("已关闭"),
    REVOKED("已撤销"),
    PAYERROR("支付失败"),
    ;
    private String status;

    WxPayStateEnum(String status) {
        this.status=status;
    }

    public static List<String> getFailStates(){
        return Arrays.stream(WxPayStateEnum.values())
                .filter(item->!item.name().equals(SUCCESS.name()))
                .map(item->item.name())
                .collect(Collectors.toList());
    }

}
